import { TimeProjectTypeEnum } from "@/enums/TimeProjectTypeEnum";

export interface TimeProjectPageQuery extends PageQuery {
  /**
   * 关键字
   */
  keywords?: string;
}

export interface TimeProjectPageVO {
  /**
   * 项目ID
   */
  id?: number;

  /**
   * 项目编码
   */
  projectCode?: string;
  /**
   * 项目名称
   */
  name?: string;
  /**
   * 项目状态
   */
  status?: number;

  /**
   * 项目进度
   */
  percentage?: number;

  /**
   * 项目比例
   */
  proportion?: number;

  /**
   * 项目图标
   */
  icon?: string;

  /**
   * 项目类型
   */
  type?: TimeProjectTypeEnum;

  /**
   * 项目开始时间
   */
  beginTime?: Date;
  /**
   * 项目结束时间
   */
  endTime?: Date;
  /**
   * 创建时间
   */
  createTime?: Date;
  /**
   * 修改时间
   */
  updateTime?: Date;
}

export type TimeProjectPageResult = PageResult<TimeProjectPageVO[]>;

export interface TimeProjectForm {
  /**
   * 项目ID
   */
  id?: number;

  /**
   * 项目编码
   */
  projectCode?: string;
  /**
   * 项目名称
   */
  projectName?: string;
  /**
   * 项目状态
   */
  status: number;

  /**
   * 项目进度
   */
  percentage?: number;

  /**
   * 项目比例
   */
  proportion?: number;

  /**
   * 项目图标
   */
  icon?: string;

  /**
   * 项目类型
   */
  type?: TimeProjectTypeEnum;

  /**
   * 项目开始时间
   */
  beginTime?: string;
  /**
   * 项目结束时间
   */
  endTime?: string;

  remark?: string;
}

export interface TimeItemProjectVO {
  id?: number;
  projectId?: number;
  userId?: number;
  itemName?: string;
  proportion?: number;
  percentage?: number;
  remark?: string;
  type?: string;
  icon: string;
  children: TimeItemProjectDayVO[];
}

export interface TimeItemProjectForm {
  id?: number;
  projectId?: number;
  userId?: number;
  itemName?: string;
  proportion?: number;
  percentage?: number;
  status: number;
  remark?: string;
  type?: string;
  icon?: string;
}

export interface TimeItemProjectDayVO {
  id: number;
  projectId: number;
  userId: number;
  itemName: string;
  percentageChange: number;
  remark: string;
  type: string;
  icon: string;
  day: string;
}

export interface TimeProjectStatisticsPageVO {
  color: string;
  linearGradientColor: string[];
  id: number;
  name: string;
  days: string[];
  percentage: number[];
}
